﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once
#include "GnufBase.h"

namespace gnuf {
    class QtSplashScreen;
    class GNUF_BASE_EXPORT SplashScreen final
    {
    public:
        SplashScreen();
        ~SplashScreen();

        bool visible() const;
        void show();
        void hide();

        static void setStaticBackgroundImage(const std::wstring & v);

        void setBackgroundImage(const std::wstring & v) { m_backgroundImage = v; }
        const std::wstring & backgroundImage() const { return m_backgroundImage; }

        void setWaitingAnimation(const std::wstring & v) { m_waitingAnimation = v; }
        const std::wstring & waitingAnimation() const { return m_waitingAnimation; }

    private:
        std::wstring m_backgroundImage, m_waitingAnimation;

        gcmp::OwnerPtr< QtSplashScreen > m_qtSplashScreen;
    };
}
